const share = {

	onLoad() { // 创建时设置统一页面的默认值
		uni.$mpShare = {
			title: `${uni.getStorageSync('userInfo')?.value?.shanghuname?uni.getStorageSync('userInfo')?.value?.shanghuname+'-':''}袋鼠充充`,
			desc: '快来看看',
			path: `/pages/index/index?pid=${uni.getStorageSync('userInfo')?.value?.id||''}&shanghuid=${uni.getStorageSync('userInfo')?.value?.shanghuid||''}`, // 默认为当前页面路径
			imageUrl: '' // 默认为当前页面的截图
		}
	},
	onShareAppMessage(v) {
		console.log(uni.$mpShare, 8899);
		return uni.$mpShare
	},
	// 分享到朋友圈
	onShareTimeline() {
		return uni.$mpShare
	},
	onUnload() { // 关闭页面时重置
		uni.$mpShare = {
			title: `${uni.getStorageSync('userInfo')?.value?.shanghuname?uni.getStorageSync('userInfo')?.value?.shanghuname+'-':''}袋鼠充充`,
			desc: '快来看看',
			path: `/pages/index/index?pid=${uni.getStorageSync('userInfo')?.value?.id||''}&shanghuid=${uni.getStorageSync('userInfo')?.value?.shanghuid||''}`, // 默认为当前页面路径
			imageUrl: '' // 默认为当前页面的截图
		}
	}

}
export default share;